package com.ydc.ln.tutorial.gui.test.window;

import java.awt.Color;
import java.awt.Dialog;
import java.awt.Frame;

/**
 * 窗口中显示一个对话框
 * 
 * @author ydc
 * @date 下午10:59:34 2013-5-17
 */
public class DialogFrame extends Frame {
    /**
     * @Fields serialVersionUID
     */ 
    private static final long serialVersionUID = 7828957269692078065L;

    public static void main(String[] args) {
        DialogFrame fd = new DialogFrame("Frame and Dialog Test");
        fd.setSize(400, 300);
        fd.setBackground(Color.GRAY);
        fd.setVisible(true);
        fd.showDialog();
    }

    public DialogFrame(String title) {
        super(title);
    }

    public void showDialog() {
        Dialog d = new Dialog(this, "Dialog", true);
        d.setSize(200, 100);
        d.setBackground(Color.RED);
        d.setVisible(true);
    }
}
